<template>
	<div class="articles">
		<div class="article" v-for=" article in articles" :key="article.id" 
		@click="sendArticleId(article.id)">
			<div class="article-title">
				{{article.title}}
			</div>
			
		</div>
	</div>
</template>

<script>
	export default{
		props:{
			articles:{
				type:Array,
				required:true
			}
		},
		methods:{
			sendArticleId(id){
				this.$emit('getarticleid',id);
			}
		}
	}
</script>

<style scoped>
</style>
